<template>
  <div>
    <h2>我一共有{{ moneyCount }}元</h2>
    <h5>目前的状态：{{ moneyCount > 10000 ? '有钱人' : '穷光蛋' }}</h5>
    <button @click="eat">吃饭100</button>
    <button @click="moneyCount -= 60">洗脚60</button>
    <button @click="moneyCount -= 1000">约会1000</button>
    <button @click="moneyCount += 100">送外卖+100</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      moneyCount: 10000,
    }
  },
  methods: {
    eat() {
      this.moneyCount -= 100
    },
  },
}
</script>